<form class="form-horizontal" method="post">
	<input type="hidden" name="action" value="modify_popup" />
	<input type="hidden" name="idx" value="<?php echo $result['idx']?>" />
	<input type="hidden" name="options" value="<?php echo @$options ?>" />
	
	<div class="control-group">
		<label class="control-label" for="fromdate">팝업시작일</label>
		<div class="controls"><input type="text" name="fromdate" id="fromdate" required value="<?php echo date("Y/m/d H:i:s", $result['fromdate'])?>" autofocus /></div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="todate">팝업종료일</label>
		<div class="controls"><input type="text" name="todate" id="todate" required value="<?php echo date("Y/m/d H:i:s", $result['todate'])?>" /></div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="width">창크기</label>
		<div class="controls">
			가로 : <input type="text" name="width" id="width" required style="width:50px" value="<?php echo $result['width']?>" />
			세로 : <input type="text" name="height" id="height" required style="width:50px" value="<?php echo $result['height']?>" />
		</div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="left">창위치</label>
		<div class="controls">
			좌측 : <input type="text" name="left" id="left" required style="width:50px" value="<?php echo $result['left']?>" />
			상단 : <input type="text" name="top" id="top" required style="width:50px" value="<?php echo $result['top']?>" />
		</div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="background">바탕색</label>
		<div class="controls">
			<input type="text" name="background" id="background" required style="width:80px" value="<?php echo $result['background']?>" />
		</div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="color">글씨색</label>
		<div class="controls">
			<input type="text" name="color" id="color" required style="width:80px" value="<?php echo $result['color']?>" />
		</div>
	</div>
	
	<div class="control-textarea">
		<textarea name="contents" id="contents" class="redactor" data-imageup="http://<?php echo HOME?>/redactor/image" data-fileup="http://<?php echo HOME?>/redactor/file"><?php echo htmlspecialchars($result['contents'])?></textarea>
	</div>
	
	<div class="control-group">
		<div class="controls pull-right">
			<button type="submit" name="submit" id="submit" class="btn btn-warning">수정</button>
			<a data-toggle="modal" href="#myDelete" class="btn">삭제</a>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<input type="hidden" name="action" value="delete_popup" />
	<input type="hidden" name="idx" value="<?php echo $result['idx']?>" />
	
	<div id="myDelete" class="modal hide fade">
		<div class="modal-header">
			<button type="button" data-dismiss="modal" class="close">&times;</button>
			<h4>정말로 삭제합니까?</h4>
		</div>
		<div class="modal-body"><p>한번 삭제하면 다시는 돌이킬 수 없습니다.</p></div>
		<div class="modal-footer">
			<a href="#" data-dismiss="modal" class="btn">닫기</a>
			<button type="submit" class="btn btn-warning">삭제</button>
		</div>
	</div>
</form>	